package org.zhou.pojo;

import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.math.BigDecimal;

@Data
public class Readers {
    private Integer id;
    @NotEmpty
    @Pattern(regexp = "^\\S{1,10}$")
    private String name;
    @NotEmpty
    @Pattern(regexp = "^\\S{1,10}$")
    private String idNumber;
    @Pattern(regexp = "^(?:(?:\\+|00)86)?1(?:(?:3[\\d])|(?:4[5-7|9])|(?:5[0-3|5-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\\d])|(?:9[1|8|9]))\\d{8}$")
    private String phone;
    @Pattern(regexp = "^\\d+\\.\\d{1}$")
    private BigDecimal balance;
    private Integer status;
}
